import Vue from 'vue'
import VueRouter from 'vue-router'
import router from './router/router'
import store from './store/'
import 'babel-polyfill'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

// fade/zoom 等
import 'element-ui/lib/theme-chalk/base.css';

import './router/permission';	//权限拦截
import { setStore, getStore } from 'src/config/mUtils'

Vue.use(ElementUI);
Vue.use(VueRouter);
window.addEventListener('hashchange', function(ev){
	let hash = window.location.hash && window.location.hash.split('#')[1];

	if (hash === '/login') {
		setStore('userInfo', {});
	}
});

new Vue({
	router,
	store,
}).$mount('#app')